home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / gcc-2.6.3-bin.lha / GNU / info / gcc.info-5 (.txt) < prev    next >
GNU Info File  |  1995-03-30  |  33KB  |  563 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993, 1994 Free Software Foundation,
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License," "Funding for
  13. Free Software," and "Protect Your Freedom--Fight `Look And Feel'" are
  14. included exactly as in the original, and provided that the entire
  15. resulting derived work is distributed under the terms of a permission
  16. notice identical to this one.
  17.    Permission is granted to copy and distribute translations of this
  18. manual into another language, under the above conditions for modified
  19. versions, except that the sections entitled "GNU General Public
  20. License," "Funding for Free Software," and "Protect Your Freedom--Fight
  21. `Look And Feel'", and this permission notice, may be included in
  22. translations approved by the Free Software Foundation instead of in the
  23. original English.
  24. File: gcc.info,  Node: Environment Variables,  Next: Running Protoize,  Prev: Code Gen Options,  Up: Invoking GCC
  25. Environment Variables Affecting GNU CC
  26. ======================================
  27.    This section describes several environment variables that affect how
  28. GNU CC operates.  They work by specifying directories or prefixes to use
  29. when searching for various kinds of files.
  30.    Note that you can also specify places to search using options such as
  31. `-B', `-I' and `-L' (*note Directory Options::.).  These take
  32. precedence over places specified using environment variables, which in
  33. turn take precedence over those specified by the configuration of GNU
  34. CC.  *Note Driver::.
  35. `TMPDIR'
  36.      If `TMPDIR' is set, it specifies the directory to use for temporary
  37.      files.  GNU CC uses temporary files to hold the output of one
  38.      stage of compilation which is to be used as input to the next
  39.      stage: for example, the output of the preprocessor, which is the
  40.      input to the compiler proper.
  41. `GCC_EXEC_PREFIX'
  42.      If `GCC_EXEC_PREFIX' is set, it specifies a prefix to use in the
  43.      names of the subprograms executed by the compiler.  No slash is
  44.      added when this prefix is combined with the name of a subprogram,
  45.      but you can specify a prefix that ends with a slash if you wish.
  46.      If GNU CC cannot find the subprogram using the specified prefix, it
  47.      tries looking in the usual places for the subprogram.
  48.      The default value of `GCC_EXEC_PREFIX' is
  49.      `PREFIX/lib/gcc-lib/MACHINE/VERSION/' where PREFIX is the value of
  50.      `prefix' when you ran the `configure' script and MACHINE and
  51.      VERSION are the configuration name and version number of GNU CC,
  52.      respectively.
  53.      Other prefixes specified with `-B' take precedence over this
  54.      prefix.
  55.      This prefix is also used for finding files such as `crt0.o' that
  56.      are used for linking.
  57.      In addition, the prefix is used in an unusual way in finding the
  58.      directories to search for header files.  For each of the standard
  59.      directories whose name normally begins with
  60.      `/usr/local/lib/gcc-lib' (more precisely, with the value of
  61.      `GCC_INCLUDE_DIR'), GNU CC tries replacing that beginning with the
  62.      specified prefix to produce an alternate directory name.  Thus,
  63.      with `-Bfoo/', GNU CC will search `foo/bar' where it would
  64.      normally search `/usr/local/lib/bar'.  These alternate directories
  65.      are searched first; the standard directories come next.
  66. `COMPILER_PATH'
  67.      The value of `COMPILER_PATH' is a colon-separated list of
  68.      directories, much like `PATH'.  GNU CC tries the directories thus
  69.      specified when searching for subprograms, if it can't find the
  70.      subprograms using `GCC_EXEC_PREFIX'.
  71. `LIBRARY_PATH'
  72.      The value of `LIBRARY_PATH' is a colon-separated list of
  73.      directories, much like `PATH'.  GNU CC tries the directories thus
  74.      specified when searching for special linker files, if it can't
  75.      find them using `GCC_EXEC_PREFIX'.  Linking using GNU CC also uses
  76.      these directories when searching for ordinary libraries for the
  77.      `-l' option (but directories specified with `-L' come first).
  78. `C_INCLUDE_PATH'
  79. `CPLUS_INCLUDE_PATH'
  80. `OBJC_INCLUDE_PATH'
  81.      These environment variables pertain to particular languages.  Each
  82.      variable's value is a colon-separated list of directories, much
  83.      like `PATH'.  When GNU CC searches for header files, it tries the
  84.      directories listed in the variable for the language you are using,
  85.      after the directories specified with `-I' but before the standard
  86.      header file directories.
  87. `DEPENDENCIES_OUTPUT'
  88.      If this variable is set, its value specifies how to output
  89.      dependencies for Make based on the header files processed by the
  90.      compiler.  This output looks much like the output from the `-M'
  91.      option (*note Preprocessor Options::.), but it goes to a separate
  92.      file, and is in addition to the usual results of compilation.
  93.      The value of `DEPENDENCIES_OUTPUT' can be just a file name, in
  94.      which case the Make rules are written to that file, guessing the
  95.      target name from the source file name.  Or the value can have the
  96.      form `FILE TARGET', in which case the rules are written to file
  97.      FILE using TARGET as the target name.
  98. File: gcc.info,  Node: Running Protoize,  Prev: Environment Variables,  Up: Invoking GCC
  99. Running Protoize
  100. ================
  101.    The program `protoize' is an optional part of GNU C.  You can use it
  102. to add prototypes to a program, thus converting the program to ANSI C
  103. in one respect.  The companion program `unprotoize' does the reverse:
  104. it removes argument types from any prototypes that are found.
  105.    When you run these programs, you must specify a set of source files
  106. as command line arguments.  The conversion programs start out by
  107. compiling these files to see what functions they define.  The
  108. information gathered about a file FOO is saved in a file named `FOO.X'.
  109.    After scanning comes actual conversion.  The specified files are all
  110. eligible to be converted; any files they include (whether sources or
  111. just headers) are eligible as well.
  112.    But not all the eligible files are converted.  By default,
  113. `protoize' and `unprotoize' convert only source and header files in the
  114. current directory.  You can specify additional directories whose files
  115. should be converted with the `-d DIRECTORY' option.  You can also
  116. specify particular files to exclude with the `-x FILE' option.  A file
  117. is converted if it is eligible, its directory name matches one of the
  118. specified directory names, and its name within the directory has not
  119. been excluded.
  120.    Basic conversion with `protoize' consists of rewriting most function
  121. definitions and function declarations to specify the types of the
  122. arguments.  The only ones not rewritten are those for varargs functions.
  123.    `protoize' optionally inserts prototype declarations at the
  124. beginning of the source file, to make them available for any calls that
  125. precede the function's definition.  Or it can insert prototype
  126. declarations with block scope in the blocks where undeclared functions
  127. are called.
  128.    Basic conversion with `unprotoize' consists of rewriting most
  129. function declarations to remove any argument types, and rewriting
  130. function definitions to the old-style pre-ANSI form.
  131.    Both conversion programs print a warning for any function
  132. declaration or definition that they can't convert.  You can suppress
  133. these warnings with `-q'.
  134.    The output from `protoize' or `unprotoize' replaces the original
  135. source file.  The original file is renamed to a name ending with
  136. `.save'.  If the `.save' file already exists, then the source file is
  137. simply discarded.
  138.    `protoize' and `unprotoize' both depend on GNU CC itself to scan the
  139. program and collect information about the functions it uses.  So
  140. neither of these programs will work until GNU CC is installed.
  141.    Here is a table of the options you can use with `protoize' and
  142. `unprotoize'.  Each option works with both programs unless otherwise
  143. stated.
  144. `-B DIRECTORY'
  145.      Look for the file `SYSCALLS.c.X' in DIRECTORY, instead of the
  146.      usual directory (normally `/usr/local/lib').  This file contains
  147.      prototype information about standard system functions.  This option
  148.      applies only to `protoize'.
  149. `-c COMPILATION-OPTIONS'
  150.      Use  COMPILATION-OPTIONS as the options when running `gcc' to
  151.      produce the `.X' files.  The special option `-aux-info' is always
  152.      passed in addition, to tell `gcc' to write a `.X' file.
  153.      Note that the compilation options must be given as a single
  154.      argument to `protoize' or `unprotoize'.  If you want to specify
  155.      several `gcc' options, you must quote the entire set of
  156.      compilation options to make them a single word in the shell.
  157.      There are certain `gcc' arguments that you cannot use, because they
  158.      would produce the wrong kind of output.  These include `-g', `-O',
  159.      `-c', `-S', and `-o' If you include these in the
  160.      COMPILATION-OPTIONS, they are ignored.
  161.      Rename files to end in `.C' instead of `.c'.  This is convenient
  162.      if you are converting a C program to C++.  This option applies
  163.      only to `protoize'.
  164.      Add explicit global declarations.  This means inserting explicit
  165.      declarations at the beginning of each source file for each function
  166.      that is called in the file and was not declared.  These
  167.      declarations precede the first function definition that contains a
  168.      call to an undeclared function.  This option applies only to
  169.      `protoize'.
  170. `-i STRING'
  171.      Indent old-style parameter declarations with the string STRING.
  172.      This option applies only to `protoize'.
  173.      `unprotoize' converts prototyped function definitions to old-style
  174.      function definitions, where the arguments are declared between the
  175.      argument list and the initial `{'.  By default, `unprotoize' uses
  176.      five spaces as the indentation.  If you want to indent with just
  177.      one space instead, use `-i " "'.
  178.      Keep the `.X' files.  Normally, they are deleted after conversion
  179.      is finished.
  180.      Add explicit local declarations.  `protoize' with `-l' inserts a
  181.      prototype declaration for each function in each block which calls
  182.      the function without any declaration.  This option applies only to
  183.      `protoize'.
  184.      Make no real changes.  This mode just prints information about the
  185.      conversions that would have been done without `-n'.
  186.      Make no `.save' files.  The original files are simply deleted.
  187.      Use this option with caution.
  188. `-p PROGRAM'
  189.      Use the program PROGRAM as the compiler.  Normally, the name `gcc'
  190.      is used.
  191.      Work quietly.  Most warnings are suppressed.
  192.      Print the version number, just like `-v' for `gcc'.
  193.    If you need special compiler options to compile one of your program's
  194. source files, then you should generate that file's `.X' file specially,
  195. by running `gcc' on that source file with the appropriate options and
  196. the option `-aux-info'.  Then run `protoize' on the entire set of
  197. files.  `protoize' will use the existing `.X' file because it is newer
  198. than the source file.  For example:
  199.      gcc -Dfoo=bar file1.c -aux-info
  200.      protoize *.c
  201. You need to include the special files along with the rest in the
  202. `protoize' command, even though their `.X' files already exist, because
  203. otherwise they won't get converted.
  204.    *Note Protoize Caveats::, for more information on how to use
  205. `protoize' successfully.
  206. File: gcc.info,  Node: Installation,  Next: C Extensions,  Prev: Invoking GCC,  Up: Top
  207. Installing GNU CC
  208. *****************
  209. * Menu:
  210. * Configurations::    Configurations Supported by GNU CC.
  211. * Other Dir::     Compiling in a separate directory (not where the source is).
  212. * Cross-Compiler::   Building and installing a cross-compiler.
  213. * Sun Install::   See below for installation on the Sun.
  214. * VMS Install::   See below for installation on VMS.
  215. * Collect2::      How `collect2' works; how it finds `ld'.
  216. * Header Dirs::   Understanding the standard header file directories.
  217.    Here is the procedure for installing GNU CC on a Unix system.  See
  218. *Note VMS Install::, for VMS systems.  In this section we assume you
  219. compile in the same directory that contains the source files; see *Note
  220. Other Dir::, to find out how to compile in a separate directory on Unix
  221. systems.
  222.    You cannot install GNU C by itself on MSDOS; it will not compile
  223. under any MSDOS compiler except itself.  You need to get the complete
  224. compilation package DJGPP, which includes binaries as well as sources,
  225. and includes all the necessary compilation tools and libraries.
  226.   1. If you have built GNU CC previously in the same directory for a
  227.      different target machine, do `make distclean' to delete all files
  228.      that might be invalid.  One of the files this deletes is
  229.      `Makefile'; if `make distclean' complains that `Makefile' does not
  230.      exist, it probably means that the directory is already suitably
  231.      clean.
  232.   2. On a System V release 4 system, make sure `/usr/bin' precedes
  233.      `/usr/ucb' in `PATH'.  The `cc' command in `/usr/ucb' uses
  234.      libraries which have bugs.
  235.   3. Specify the host, build and target machine configurations.  You do
  236.      this by running the file `configure'.
  237.      The "build" machine is the system which you are using, the "host"
  238.      machine is the system where you want to run the resulting compiler
  239.      (normally the build machine), and the "target" machine is the
  240.      system for which you want the compiler to generate code.
  241.      If you are building a compiler to produce code for the machine it
  242.      runs on (a native compiler), you normally do not need to specify
  243.      any operands to `configure'; it will try to guess the type of
  244.      machine you are on and use that as the build, host and target
  245.      machines.  So you don't need to specify a configuration when
  246.      building a native compiler unless `configure' cannot figure out
  247.      what your configuration is or guesses wrong.
  248.      In those cases, specify the build machine's "configuration name"
  249.      with the `--build' option; the host and target will default to be
  250.      the same as the build machine.  (If you are building a
  251.      cross-compiler, see *Note Cross-Compiler::.)
  252.      Here is an example:
  253.           ./configure --build=sparc-sun-sunos4.1
  254.      A configuration name may be canonical or it may be more or less
  255.      abbreviated.
  256.      A canonical configuration name has three parts, separated by
  257.      dashes.  It looks like this: `CPU-COMPANY-SYSTEM'.  (The three
  258.      parts may themselves contain dashes; `configure' can figure out
  259.      which dashes serve which purpose.)  For example,
  260.      `m68k-sun-sunos4.1' specifies a Sun 3.
  261.      You can also replace parts of the configuration by nicknames or
  262.      aliases.  For example, `sun3' stands for `m68k-sun', so
  263.      `sun3-sunos4.1' is another way to specify a Sun 3.  You can also
  264.      use simply `sun3-sunos', since the version of SunOS is assumed by
  265.      default to be version 4.  `sun3-bsd' also works, since `configure'
  266.      knows that the only BSD variant on a Sun 3 is SunOS.
  267.      You can specify a version number after any of the system types,
  268.      and some of the CPU types.  In most cases, the version is
  269.      irrelevant, and will be ignored.  So you might as well specify the
  270.      version if you know it.
  271.      See *Note Configurations::, for a list of supported configuration
  272.      names and notes on many of the configurations.  You should check
  273.      the notes in that section before proceding any further with the
  274.      installation of GNU CC.
  275.      There are four additional options you can specify independently to
  276.      describe variant hardware and software configurations.  These are
  277.      `--with-gnu-as', `--with-gnu-ld', `--with-stabs' and `--nfp'.
  278.     `--with-gnu-as'
  279.           If you will use GNU CC with the GNU assembler (GAS), you
  280.           should declare this by using the `--with-gnu-as' option when
  281.           you run `configure'.
  282.           Using this option does not install GAS.  It only modifies the
  283.           output of GNU CC to work with GAS.  Building and installing
  284.           GAS is up to you.
  285.           Conversely, if you *do not* wish to use GAS and do not specify
  286.           `--with-gnu-as' when building GNU CC, it is up to you to make
  287.           sure that GAS is not installed.  GNU CC searches for a
  288.           program named `as' in various directories; if the program it
  289.           finds is GAS, then it runs GAS.  If you are not sure where
  290.           GNU CC finds the assembler it is using, try specifying `-v'
  291.           when you run it.
  292.           The systems where it makes a difference whether you use GAS
  293.           are
  294.           `hppa1.0-ANY-ANY', `hppa1.1-ANY-ANY', `i386-ANY-sysv',
  295.           `i386-ANY-isc',
  296.           `i860-ANY-bsd', `m68k-bull-sysv', `m68k-hp-hpux',
  297.           `m68k-sony-bsd',
  298.           `m68k-altos-sysv', `m68000-hp-hpux', `m68000-att-sysv', and
  299.           `mips-ANY').  On any other system, `--with-gnu-as' has no
  300.           effect.
  301.           On the systems listed above (except for the HP-PA, for ISC on
  302.           the 386, and for `mips-sgi-irix5.*'), if you use GAS, you
  303.           should also use the GNU linker (and specify `--with-gnu-ld').
  304.     `--with-gnu-ld'
  305.           Specify the option `--with-gnu-ld' if you plan to use the GNU
  306.           linker with GNU CC.
  307.           This option does not cause the GNU linker to be installed; it
  308.           just modifies the behavior of GNU CC to work with the GNU
  309.           linker.  Specifically, it inhibits the installation of
  310.           `collect2', a program which otherwise serves as a front-end
  311.           for the system's linker on most configurations.
  312.     `--with-stabs'
  313.           On MIPS based systems and on Alphas, you must specify whether
  314.           you want GNU CC to create the normal ECOFF debugging format,
  315.           or to use BSD-style stabs passed through the ECOFF symbol
  316.           table.  The normal ECOFF debug format cannot fully handle
  317.           languages other than C.  BSD stabs format can handle other
  318.           languages, but it only works with the GNU debugger GDB.
  319.           Normally, GNU CC uses the ECOFF debugging format by default;
  320.           if you prefer BSD stabs, specify `--with-stabs' when you
  321.           configure GNU CC.
  322.           No matter which default you choose when you configure GNU CC,
  323.           the user can use the `-gcoff' and `-gstabs+' options to
  324.           specify explicitly the debug format for a particular
  325.           compilation.
  326.           `--with-stabs' is meaningful on the ISC system on the 386,
  327.           also, if `--with-gas' is used.  It selects use of stabs
  328.           debugging information embedded in COFF output.  This kind of
  329.           debugging information supports C++ well; ordinary COFF
  330.           debugging information does not.
  331.           `--with-stabs' is also meaningful on 386 systems running
  332.           SVR4.  It selects use of stabs debugging information embedded
  333.           in ELF output.  The C++ compiler currently (2.6.0) does not
  334.           support the DWARF debugging information normally used on 386
  335.           SVR4 platforms; stabs provide a workable alternative.  This
  336.           requires gas and gdb, as the normal SVR4 tools can not
  337.           generate or interpret stabs.
  338.     `--nfp'
  339.           On certain systems, you must specify whether the machine has
  340.           a floating point unit.  These systems include
  341.           `m68k-sun-sunosN' and `m68k-isi-bsd'.  On any other system,
  342.           `--nfp' currently has no effect, though perhaps there are
  343.           other systems where it could usefully make a difference.
  344.      The `configure' script searches subdirectories of the source
  345.      directory for other compilers that are to be integrated into GNU
  346.      CC.  The GNU compiler for C++, called G++ is in a subdirectory
  347.      named `cp'.  `configure' inserts rules into `Makefile' to build
  348.      all of those compilers.
  349.      Here we spell out what files will be set up by `configure'.
  350.      Normally you need not be concerned with these files.
  351.         * A symbolic link named `config.h' is made to the top-level
  352.           config file for the machine you will run the compiler on
  353.           (*note Config::.).  This file is responsible for defining
  354.           information about the host machine.  It includes `tm.h'.
  355.           The top-level config file is located in the subdirectory
  356.           `config'.  Its name is always `xm-SOMETHING.h'; usually
  357.           `xm-MACHINE.h', but there are some exceptions.
  358.           If your system does not support symbolic links, you might
  359.           want to set up `config.h' to contain a `#include' command
  360.           which refers to the appropriate file.
  361.         * A symbolic link named `tconfig.h' is made to the top-level
  362.           config file for your target machine.  This is used for
  363.           compiling certain programs to run on that machine.
  364.         * A symbolic link named `tm.h' is made to the
  365.           machine-description macro file for your target machine.  It
  366.           should be in the subdirectory `config' and its name is often
  367.           `MACHINE.h'.
  368.         * A symbolic link named `md' will be made to the machine
  369.           description pattern file.  It should be in the `config'
  370.           subdirectory and its name should be `MACHINE.md'; but MACHINE
  371.           is often not the same as the name used in the `tm.h' file
  372.           because the `md' files are more general.
  373.         * A symbolic link named `aux-output.c' will be made to the
  374.           output subroutine file for your machine.  It should be in the
  375.           `config' subdirectory and its name should be `MACHINE.c'.
  376.         * The command file `configure' also constructs the file
  377.           `Makefile' by adding some text to the template file
  378.           `Makefile.in'.  The additional text comes from files in the
  379.           `config' directory, named `t-TARGET' and `x-HOST'.  If these
  380.           files do not exist, it means nothing needs to be added for a
  381.           given target or host.
  382.   4. The standard directory for installing GNU CC is `/usr/local/lib'.
  383.      If you want to install its files somewhere else, specify
  384.      `--prefix=DIR' when you run `configure'.  Here DIR is a directory
  385.      name to use instead of `/usr/local' for all purposes with one
  386.      exception: the directory `/usr/local/include' is searched for
  387.      header files no matter where you install the compiler.  To override
  388.      this name, use the `--local-prefix' option below.
  389.   5. Specify `--local-prefix=DIR' if you want the compiler to search
  390.      directory `DIR/include' for locally installed header files
  391.      *instead* of `/usr/local/include'.
  392.      You should specify `--local-prefix' *only* if your site has a
  393.      different convention (not `/usr/local') for where to put
  394.      site-specific files.
  395.      *Do not* specify `/usr' as the `--local-prefix'!  The directory
  396.      you use for `--local-prefix' *must not* contain any of the
  397.      system's standard header files.  If it did contain them, certain
  398.      programs would be miscompiled (including GNU Emacs, on certain
  399.      targets), because this would override and nullify the header file
  400.      corrections made by the `fixincludes' script.
  401.   6. Make sure the Bison parser generator is installed.  (This is
  402.      unnecessary if the Bison output files `c-parse.c' and `cexp.c' are
  403.      more recent than `c-parse.y' and `cexp.y' and you do not plan to
  404.      change the `.y' files.)
  405.      Bison versions older than Sept 8, 1988 will produce incorrect
  406.      output for `c-parse.c'.
  407.   7. If you have chosen a configuration for GNU CC which requires other
  408.      GNU tools (such as GAS or the GNU linker) instead of the standard
  409.      system tools, install the required tools in the build directory
  410.      under the names `as', `ld' or whatever is appropriate.  This will
  411.      enable the compiler to find the proper tools for compilation of
  412.      the program `enquire'.
  413.      Alternatively, you can do subsequent compilation using a value of
  414.      the `PATH' environment variable such that the necessary GNU tools
  415.      come before the standard system tools.
  416.   8. Build the compiler.  Just type `make LANGUAGES=c' in the compiler
  417.      directory.
  418.      `LANGUAGES=c' specifies that only the C compiler should be
  419.      compiled.  The makefile normally builds compilers for all the
  420.      supported languages; currently, C, C++ and Objective C.  However,
  421.      C is the only language that is sure to work when you build with
  422.      other non-GNU C compilers.  In addition, building anything but C
  423.      at this stage is a waste of time.
  424.      In general, you can specify the languages to build by typing the
  425.      argument `LANGUAGES="LIST"', where LIST is one or more words from
  426.      the list `c', `c++', and `objective-c'.  If you have any
  427.      additional GNU compilers as subdirectories of the GNU CC source
  428.      directory, you may also specify their names in this list.
  429.      Ignore any warnings you may see about "statement not reached" in
  430.      `insn-emit.c'; they are normal.  Also, warnings about "unknown
  431.      escape sequence" are normal in `genopinit.c' and perhaps some
  432.      other files.  Likewise, you should ignore warnings about "constant
  433.      is so large that it is unsigned" in `insn-emit.c' and
  434.      `insn-recog.c'.  Any other compilation errors may represent bugs in
  435.      the port to your machine or operating system, and should be
  436.      investigated and reported (*note Bugs::.).
  437.      Some commercial compilers fail to compile GNU CC because they have
  438.      bugs or limitations.  For example, the Microsoft compiler is said
  439.      to run out of macro space.  Some Ultrix compilers run out of
  440.      expression space; then you need to break up the statement where
  441.      the problem happens.
  442.   9. If you are building a cross-compiler, stop here.  *Note
  443.      Cross-Compiler::.
  444.  10. Move the first-stage object files and executables into a
  445.      subdirectory with this command:
  446.           make stage1
  447.      The files are moved into a subdirectory named `stage1'.  Once
  448.      installation is complete, you may wish to delete these files with
  449.      `rm -r stage1'.
  450.  11. If you have chosen a configuration for GNU CC which requires other
  451.      GNU tools (such as GAS or the GNU linker) instead of the standard
  452.      system tools, install the required tools in the `stage1'
  453.      subdirectory under the names `as', `ld' or whatever is
  454.      appropriate.  This will enable the stage 1 compiler to find the
  455.      proper tools in the following stage.
  456.      Alternatively, you can do subsequent compilation using a value of
  457.      the `PATH' environment variable such that the necessary GNU tools
  458.      come before the standard system tools.
  459.  12. Recompile the compiler with itself, with this command:
  460.           make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O"
  461.      This is called making the stage 2 compiler.
  462.      The command shown above builds compilers for all the supported
  463.      languages.  If you don't want them all, you can specify the
  464.      languages to build by typing the argument `LANGUAGES="LIST"'.  LIST
  465.      should contain one or more words from the list `c', `c++',
  466.      `objective-c', and `proto'.  Separate the words with spaces.
  467.      `proto' stands for the programs `protoize' and `unprotoize'; they
  468.      are not a separate language, but you use `LANGUAGES' to enable or
  469.      disable their installation.
  470.      If you are going to build the stage 3 compiler, then you might
  471.      want to build only the C language in stage 2.
  472.      Once you have built the stage 2 compiler, if you are short of disk
  473.      space, you can delete the subdirectory `stage1'.
  474.      On a 68000 or 68020 system lacking floating point hardware, unless
  475.      you have selected a `tm.h' file that expects by default that there
  476.      is no such hardware, do this instead:
  477.           make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O -msoft-float"
  478.  13. If you wish to test the compiler by compiling it with itself one
  479.      more time, install any other necessary GNU tools (such as GAS or
  480.      the GNU linker) in the `stage2' subdirectory as you did in the
  481.      `stage1' subdirectory, then do this:
  482.           make stage2
  483.           make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
  484.      This is called making the stage 3 compiler.  Aside from the `-B'
  485.      option, the compiler options should be the same as when you made
  486.      the stage 2 compiler.  But the `LANGUAGES' option need not be the
  487.      same.  The command shown above builds compilers for all the
  488.      supported languages; if you don't want them all, you can specify
  489.      the languages to build by typing the argument `LANGUAGES="LIST"',
  490.      as described above.
  491.      If you do not have to install any additional GNU tools, you may
  492.      use the command
  493.           make bootstrap LANGUAGES=LANGUAGE-LIST BOOT_CFLAGS=OPTION-LIST
  494.      instead of making `stage1', `stage2', and performing the two
  495.      compiler builds.
  496.  14. Then compare the latest object files with the stage 2 object
  497.      files--they ought to be identical, aside from time stamps (if any).
  498.      On some systems, meaningful comparison of object files is
  499.      impossible; they always appear "different."  This is currently
  500.      true on Solaris and probably on all systems that use ELF object
  501.      file format.  On some versions of Irix on SGI machines and OSF/1
  502.      on Alpha systems, you will not be able to compare the files
  503.      without specifying `-save-temps'; see the description of
  504.      individual systems above to see if you get comparison failures.
  505.      You may have similar problems on other systems.
  506.      Use this command to compare the files:
  507.           make compare
  508.      This will mention any object files that differ between stage 2 and
  509.      stage 3.  Any difference, no matter how innocuous, indicates that
  510.      the stage 2 compiler has compiled GNU CC incorrectly, and is
  511.      therefore a potentially serious bug which you should investigate
  512.      and report (*note Bugs::.).
  513.      If your system does not put time stamps in the object files, then
  514.      this is a faster way to compare them (using the Bourne shell):
  515.           for file in *.o; do
  516.           cmp $file stage2/$file
  517.           done
  518.      If you have built the compiler with the `-mno-mips-tfile' option on
  519.      MIPS machines, you will not be able to compare the files.
  520.  15. Build the Objective C library (if you have built the Objective C
  521.      compiler).  Here is the command to do this:
  522.           make objc-runtime CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
  523.  16. Install the compiler driver, the compiler's passes and run-time
  524.      support with `make install'.  Use the same value for `CC',
  525.      `CFLAGS' and `LANGUAGES' that you used when compiling the files
  526.      that are being installed.  One reason this is necessary is that
  527.      some versions of Make have bugs and recompile files gratuitously
  528.      when you do this step.  If you use the same variable values, those
  529.      files will be recompiled properly.
  530.      For example, if you have built the stage 2 compiler, you can use
  531.      the following command:
  532.           make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="LIST"
  533.      This copies the files `cc1', `cpp' and `libgcc.a' to files `cc1',
  534.      `cpp' and `libgcc.a' in the directory
  535.      `/usr/local/lib/gcc-lib/TARGET/VERSION', which is where the
  536.      compiler driver program looks for them.  Here TARGET is the target
  537.      machine type specified when you ran `configure', and VERSION is
  538.      the version number of GNU CC.  This naming scheme permits various
  539.      versions and/or cross-compilers to coexist.
  540.      This also copies the driver program `xgcc' into
  541.      `/usr/local/bin/gcc', so that it appears in typical execution
  542.      search paths.
  543.      On some systems, this command causes recompilation of some files.
  544.      This is usually due to bugs in `make'.  You should either ignore
  545.      this problem, or use GNU Make.
  546.      *Warning: there is a bug in `alloca' in the Sun library.  To avoid
  547.      this bug, be sure to install the executables of GNU CC that were
  548.      compiled by GNU CC.  (That is, the executables from stage 2 or 3,
  549.      not stage 1.)  They use `alloca' as a built-in function and never
  550.      the one in the library.*
  551.      (It is usually better to install GNU CC executables from stage 2
  552.      or 3, since they usually run faster than the ones compiled with
  553.      some other compiler.)
  554.  17. Install the Objective C library (if you are installing the
  555.      Objective C compiler).  Here is the command to do this:
  556.           make install-libobjc CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
  557.  18. If you're going to use C++, it's likely that you need to also
  558.      install the libg++ distribution.  It should be available from the
  559.      same place where you got the GNU C distribution.  Just as GNU C
  560.      does not distribute a C runtime library, it also does not include
  561.      a C++ run-time library.  All I/O functionality, special class
  562.      libraries, etc., are available in the libg++ distribution.
  563.